package com.oren.system.ctrl;

import com.oren.base.ctrl.BaseController;
import com.oren.base.pojo.Tree;
import com.oren.system.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.xml.ws.Action;
import java.util.List;

/**
 * @Author: wsw
 * @Description:
 * @Date: Create on 2018/7/29 16:21
 */
@Controller
@RequestMapping("/department")
public class DepartmentController extends BaseController {

    @Autowired
    private DepartmentService departmentService;

    @RequestMapping("/treeList")
    @ResponseBody
    public List<Tree> listDepartmentTree(HttpServletRequest request)throws Exception{
        return  departmentService.getDepartmentTree();
    }

}
